var e = require;
var t = module;
var o = exports;
Object.defineProperty(o, "__esModule", {value: !0});
var n = (function () {
    function e() {}
    return (
        (e.loadResArray = function (e, t) {
            var o = new Array(),
                n = 0,
                a = cc.ENGINE_VERSION;
            if (Number(a[2]) < 4)
                for (
                    var i = function (a) {
                            cc.loader.load(e[a], function (i, r) {
                                if (((o[a] = r), null != i || null == o[a]))
                                    return console.log("ASCSDK", "资源加载错误:" + JSON.stringify(i)), void t(!0, null);
                                ++n >= e.length && t(!1, o);
                            });
                        },
                        r = 0;
                    r < e.length;
                    r++
                )
                    i(r);
            else {
                var s = function (a) {
                    cc.assetManager.loadRemote(e[a], function (i, r) {
                        if (((o[a] = r), null != i || null == o[a]))
                            return console.log("ASCSDK", "资源加载错误:" + JSON.stringify(i)), void t(!0, null);
                        ++n >= e.length && t(!1, o);
                    });
                };
                for (r = 0; r < e.length; r++) s(r);
            }
        }),
        (e.loadResCustom = function (e, t, o) {
            var n = cc.ENGINE_VERSION;
            Number(n[2]) < 4
                ? cc.loader.load(e, function (n, a) {
                      if (!a && n) return console.log(e, "  资源加载错误:" + JSON.stringify(n)), void (o && o());
                      t(a);
                  })
                : cc.assetManager.loadRemote(e, function (n, a) {
                      if (!a && n) return console.log(e, "  资源加载错误:" + JSON.stringify(n)), void (o && o());
                      t(a);
                  });
        }),
        e
    );
})();
o.default = n;
